package com.example.jwt;

/**
 * @Classname ThreadLocalContent
 * @Description TODO 本地线程上下文
 * @Version 1.0.0
 * @Date 2023/3/1 8:52
 * @Created by wlh12
 */
public class ThreadLocalContent {
    public static ThreadLocal<String> accounts = new ThreadLocal<>();

    // 存
    public static void setThreadAccount(String account){
        accounts.set(account);
    }
    // 取
    public static String getThreadAccount(){
        return accounts.get();
    }
    // 删
    public static void removeThreadAccount(){
        accounts.remove();
    }
}
